//
//  LGOrderGoodsCell.m
//  LuxuryGoods
//
//  Created by DCQ on 2018/7/23.
//  Copyright © 2018年 Future. All rights reserved.
//

#import "LGOrderGoodsCell.h"
#import "OrderListModel.h"

@interface   LGOrderGoodsCell()
@property (weak, nonatomic) IBOutlet UIImageView *imgV;
@property (weak, nonatomic) IBOutlet UILabel *infoLabel;

@end
@implementation LGOrderGoodsCell

- (void)awakeFromNib {
    
    [super awakeFromNib];
    // Initialization code
}
- (void)setupOrderData:(id)data{
    OrderModel * model = data;
   GoodsModel * goodsModel = model.goods_item.firstObject;
    self.infoLabel.text =  goodsModel.goods_title;
    if (goodsModel.goods_img) {
        [self.imgV yy_setImageWithURL:[NSURL URLWithString:goodsModel.goods_img] placeholder:nil];
    }
    if (goodsModel.cate_img) {
        [self.imgV yy_setImageWithURL:[NSURL URLWithString:goodsModel.cate_img] placeholder:nil];
    }
    if (goodsModel.img_list && [goodsModel.img_list count] > 0) {
        [self.imgV yy_setImageWithURL:[NSURL URLWithString:goodsModel.img_list.firstObject] placeholder:nil];
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
